package com.ymttest.database.mapping.stockmgr;

import com.ymttest.database.model.stockmgr.agentinventorysku;
import com.ymttest.database.model.stockmgr.agentinventoryskuExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface agentinventoryskuMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventorysku
     *
     * @mbggenerated Wed Feb 05 15:02:17 CST 2020
     */
    @SelectProvider(type=agentinventoryskuSqlProvider.class, method="countByExample")
    int countByExample(agentinventoryskuExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventorysku
     *
     * @mbggenerated Wed Feb 05 15:02:17 CST 2020
     */
    @DeleteProvider(type=agentinventoryskuSqlProvider.class, method="deleteByExample")
    int deleteByExample(agentinventoryskuExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventorysku
     *
     * @mbggenerated Wed Feb 05 15:02:17 CST 2020
     */
    @Delete({
        "delete from agentinventorysku",
        "where Id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventorysku
     *
     * @mbggenerated Wed Feb 05 15:02:17 CST 2020
     */
    @Insert({
        "insert into agentinventorysku (Id, ProductId, ",
        "CatalogId, Num, ",
        "Cost, CreateTime, ",
        "UpdateTime, InventoryNo)",
        "values (#{id,jdbcType=BIGINT}, #{productId,jdbcType=VARCHAR}, ",
        "#{catalogId,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, ",
        "#{cost,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP}, #{inventoryNo,jdbcType=VARBINARY})"
    })
    int insert(agentinventorysku record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventorysku
     *
     * @mbggenerated Wed Feb 05 15:02:17 CST 2020
     */
    @InsertProvider(type=agentinventoryskuSqlProvider.class, method="insertSelective")
    int insertSelective(agentinventorysku record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventorysku
     *
     * @mbggenerated Wed Feb 05 15:02:17 CST 2020
     */
    @SelectProvider(type=agentinventoryskuSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="Id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="InventoryNo", property="inventoryNo", jdbcType=JdbcType.VARBINARY),
        @Result(column="ProductId", property="productId", jdbcType=JdbcType.VARCHAR),
        @Result(column="CatalogId", property="catalogId", jdbcType=JdbcType.VARCHAR),
        @Result(column="Num", property="num", jdbcType=JdbcType.INTEGER),
        @Result(column="Cost", property="cost", jdbcType=JdbcType.DECIMAL),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="InventoryNo", property="inventoryNo", jdbcType=JdbcType.VARBINARY)
    })
    List<agentinventorysku> selectByExampleWithBLOBs(agentinventoryskuExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventorysku
     *
     * @mbggenerated Wed Feb 05 15:02:17 CST 2020
     */
    @SelectProvider(type=agentinventoryskuSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="Id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="InventoryNo", property="inventoryNo", jdbcType=JdbcType.VARBINARY),
        @Result(column="ProductId", property="productId", jdbcType=JdbcType.VARCHAR),
        @Result(column="CatalogId", property="catalogId", jdbcType=JdbcType.VARCHAR),
        @Result(column="Num", property="num", jdbcType=JdbcType.INTEGER),
        @Result(column="Cost", property="cost", jdbcType=JdbcType.DECIMAL),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<agentinventorysku> selectByExample(agentinventoryskuExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventorysku
     *
     * @mbggenerated Wed Feb 05 15:02:17 CST 2020
     */
    @Select({
        "select",
        "Id, ProductId, CatalogId, Num, Cost, CreateTime, UpdateTime, InventoryNo",
        "from agentinventorysku",
        "where Id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="Id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="InventoryNo", property="inventoryNo", jdbcType=JdbcType.VARBINARY),
        @Result(column="ProductId", property="productId", jdbcType=JdbcType.VARCHAR),
        @Result(column="CatalogId", property="catalogId", jdbcType=JdbcType.VARCHAR),
        @Result(column="Num", property="num", jdbcType=JdbcType.INTEGER),
        @Result(column="Cost", property="cost", jdbcType=JdbcType.DECIMAL),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="InventoryNo", property="inventoryNo", jdbcType=JdbcType.VARBINARY)
    })
    agentinventorysku selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventorysku
     *
     * @mbggenerated Wed Feb 05 15:02:17 CST 2020
     */
    @UpdateProvider(type=agentinventoryskuSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") agentinventorysku record, @Param("example") agentinventoryskuExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventorysku
     *
     * @mbggenerated Wed Feb 05 15:02:17 CST 2020
     */
    @UpdateProvider(type=agentinventoryskuSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") agentinventorysku record, @Param("example") agentinventoryskuExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventorysku
     *
     * @mbggenerated Wed Feb 05 15:02:17 CST 2020
     */
    @UpdateProvider(type=agentinventoryskuSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") agentinventorysku record, @Param("example") agentinventoryskuExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventorysku
     *
     * @mbggenerated Wed Feb 05 15:02:17 CST 2020
     */
    @UpdateProvider(type=agentinventoryskuSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(agentinventorysku record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventorysku
     *
     * @mbggenerated Wed Feb 05 15:02:17 CST 2020
     */
    @Update({
        "update agentinventorysku",
        "set ProductId = #{productId,jdbcType=VARCHAR},",
          "CatalogId = #{catalogId,jdbcType=VARCHAR},",
          "Num = #{num,jdbcType=INTEGER},",
          "Cost = #{cost,jdbcType=DECIMAL},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP},",
          "UpdateTime = #{updateTime,jdbcType=TIMESTAMP},",
          "InventoryNo = #{inventoryNo,jdbcType=VARBINARY}",
        "where Id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKeyWithBLOBs(agentinventorysku record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventorysku
     *
     * @mbggenerated Wed Feb 05 15:02:17 CST 2020
     */
    @Update({
        "update agentinventorysku",
        "set ProductId = #{productId,jdbcType=VARCHAR},",
          "CatalogId = #{catalogId,jdbcType=VARCHAR},",
          "Num = #{num,jdbcType=INTEGER},",
          "Cost = #{cost,jdbcType=DECIMAL},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP},",
          "UpdateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where Id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(agentinventorysku record);
}